home *** CD-ROM | disk | FTP | other *** search
/ Virtual Sex Shoot / Virtual Sex Shoot.iso / mac / Virtual Sex Shoot / Virtual Sex Shoot.DXR / 00127.ls < prev    next >
Encoding:
Text File  |  1995-09-24  |  10.2 KB  |  352 lines

  1. global gMovie1TimeCodes, gMovie2TimeCodes, gMovie3TimeCodes, gMovie4TimeCodes, gDontMessWithTheSlider, gMarkerSlots, gFrames, gLabels, gPreviousTime, gStoredTime, gWhichMovie, gWhichClip, gSliderPositions, gMovieSprite, gStartTime, gStopTime, gBDrop, gVR, gFullScreen, gWhichCamera, gSliderCorrelation, gSliderCorrelationCount, gFloatingSprite, gAutomated, gAutomatedTimes, gWhichAutomatedClip, gRecording, gPlaying, gSliderSprite, gMarkers, gMinH, gMaxH, gWhichMarker, gMarker.00, gMarker.10, gMarker.20, gMarker.30, gMarker.40, gMarker.11, gMarker.21, gMarker.31, gMarker.41, gMarkervr.2, gMarkervr.3, gMarkervr.4, gMarkervr.5, gMarkervr.11, gMarkervr.21, gMarkervr.31, gMarkervr.41, gPlaybackScreen
  2.  
  3. on forceScript whichScript
  4.   set the timeoutLapsed to the timeoutLength - 10
  5.   set the timeoutScript to whichScript
  6.   do(whichScript)
  7.   delayFor(15)
  8.   updateStage()
  9.   set the timeoutScript to "nothing"
  10. end
  11.  
  12. on freezeFrame whichFrame
  13.   setProp(1, 48, "puppet", 0)
  14.   puppetTransition(50, 0, 12)
  15.   go(whichFrame)
  16.   setProp(1, 48, "puppet", 1)
  17.   puppetTransition(0)
  18.   updateStage()
  19.   startTimer()
  20. end
  21.  
  22. on getMarkers
  23.   set the soundEnabled to 0
  24.   set returnFrame to the frame
  25.   freezeFrame("legal")
  26.   set markerList to [".00", ".10", ".20", ".30", ".40", ".11", ".21", ".31", ".41", "vr.2", "vr.3", "vr.4", "vr.5", "vr.11", "vr.21", "vr.31", "vr.41"]
  27.   set countMarkerList to count(markerList)
  28.   go(".00")
  29.   setMarkers2()
  30.   set gMarker.00 to gMarkers
  31.   go(".10")
  32.   setMarkers2()
  33.   set gMarker.10 to gMarkers
  34.   go(".20")
  35.   setMarkers2()
  36.   set gMarker.20 to gMarkers
  37.   go(".30")
  38.   setMarkers2()
  39.   set gMarker.30 to gMarkers
  40.   go(".40")
  41.   setMarkers2()
  42.   set gMarker.40 to gMarkers
  43.   go(".11")
  44.   setMarkers2()
  45.   set gMarker.11 to gMarkers
  46.   go(".21")
  47.   setMarkers2()
  48.   set gMarker.21 to gMarkers
  49.   go(".31")
  50.   setMarkers2()
  51.   set gMarker.31 to gMarkers
  52.   go(".41")
  53.   setMarkers2()
  54.   set gMarker.41 to gMarkers
  55.   go("vr.2")
  56.   setMarkers2()
  57.   set gMarkervr.2 to gMarkers
  58.   go("vr.3")
  59.   setMarkers2()
  60.   set gMarkervr.3 to gMarkers
  61.   go("vr.4")
  62.   setMarkers2()
  63.   set gMarkervr.4 to gMarkers
  64.   go("vr.5")
  65.   setMarkers2()
  66.   set gMarkervr.5 to gMarkers
  67.   go("vr.11")
  68.   setMarkers2()
  69.   set gMarkervr.11 to gMarkers
  70.   go("vr.21")
  71.   setMarkers2()
  72.   set gMarkervr.21 to gMarkers
  73.   go("vr.31")
  74.   setMarkers2()
  75.   set gMarkervr.31 to gMarkers
  76.   go("vr.41")
  77.   setMarkers2()
  78.   set gMarkervr.41 to gMarkers
  79.   repeat while the timer < 120
  80.     nothing()
  81.   end repeat
  82.   freezeFrame("logos")
  83.   preLoadCast("VRScreen.MOV")
  84.   preLoadCast("Pyramid.MOV")
  85.   preLoadCast("Ship.MOV")
  86.   preLoadCast("WindLoop.AIF")
  87.   preLoadCast("MasturMu.AIF")
  88.   repeat while the timer < 300
  89.     nothing()
  90.   end repeat
  91.   setProp(1, 48, "puppet", 0)
  92.   if returnFrame <= label("begin") then
  93.     go("begin")
  94.   else
  95.     go(returnFrame)
  96.   end if
  97.   go(the frame)
  98.   set the soundEnabled to 1
  99. end
  100.  
  101. on getMarkers2
  102.   set the soundEnabled to 0
  103.   setProp(1, 48, "visibility", 0)
  104.   updateStage()
  105.   set returnFrame to the frame
  106.   set markerList to [".00", ".10", ".20", ".30", ".40", ".11", ".21", ".31", ".41", "vr.2", "vr.3", "vr.4", "vr.5", "vr.11", "vr.21", "vr.31", "vr.41"]
  107.   set countMarkerList to count(markerList)
  108.   repeat with x = 1 to countMarkerList
  109.     set whichMarker to getAt(markerList, x)
  110.     go(whichMarker)
  111.     set gMarkers to []
  112.     repeat with y = 1 to 12
  113.       append(gMarkers, marker(y))
  114.     end repeat
  115.     forceScript("set gMarker" & whichMarker & "=gMarkers")
  116.   end repeat
  117.   go(returnFrame)
  118.   setProp(1, 48, "visibility", 1)
  119.   updateStage()
  120.   set the soundEnabled to 1
  121. end
  122.  
  123. on setMarkers
  124.   if gAutomated = 0 then
  125.     setMarkers2()
  126.     exit
  127.   else
  128.     set markers to 0
  129.     do("set markers=gMarker" & gWhichMarker)
  130.     if not listp(markers) then
  131.       setMarkers2()
  132.       exit
  133.     else
  134.       if count(markers) < 1 then
  135.         setMarkers2()
  136.         exit
  137.       else
  138.         set gMarkers to markers
  139.         exit
  140.       end if
  141.     end if
  142.   end if
  143. end
  144.  
  145. on setMarkers2
  146.   set gMarkers to []
  147.   repeat with x = 1 to 12
  148.     append(gMarkers, marker(x))
  149.   end repeat
  150.   set gMarker0 to gMarkers
  151. end
  152.  
  153. on advanceNewFrame
  154.   if gVR = 0 then
  155.     set gWhichMarker to "." & gWhichMovie & gFullScreen
  156.   else
  157.     set gWhichMarker to "vr." & gWhichMovie
  158.   end if
  159.   go(gWhichMarker)
  160.   setMarkers()
  161. end
  162.  
  163. on advanceAutomatedMovie
  164.   if gWhichAutomatedClip < 1 then
  165.     set gWhichAutomatedClip to 1
  166.   end if
  167.   set timeCodeX to getAt(gAutomatedTimes, gWhichAutomatedClip)
  168.   set gWhichMovie to getAt(timeCodeX, 1)
  169.   set numberOfClips to 0
  170.   do("set numberOfClips=count ( gMovie" & gWhichMovie & "TimeCodes )")
  171.   set gWhichClip to getAt(timeCodeX, 2)
  172.   set gWhichClip to checkRange(gWhichClip, 1, numberOfClips)
  173.   set gWhichCamera to getAt(timeCodeX, 3)
  174.   if gWhichCamera <> "B" then
  175.     set gWhichCamera to "A"
  176.   end if
  177.   set gStartTime to getAt(timeCodeX, 4)
  178.   set gStopTime to getAt(timeCodeX, 5)
  179.   set gMinH to getAt(timeCodeX, 6)
  180.   set gMaxH to getAt(timeCodeX, 7)
  181.   swapPlaybackScreen("fantasave playback")
  182.   set the movieTime of sprite gMovieSprite to gStartTime
  183.   advanceNewFrame()
  184.   go(marker(1))
  185. end
  186.  
  187. on swapPlaybackScreen whichCast
  188.   if gPlaybackScreen <> whichCast then
  189.     set gPlaybackScreen to whichCast
  190.     set the picture of cast "playback screen" to the picture of cast whichCast
  191.     if whichCast = "fantasave playback" then
  192.       setProp(17, 29, "puppet", 0)
  193.       setProp(17, 29, "visibility", 0)
  194.     end if
  195.   end if
  196. end
  197.  
  198. on checkMovieTime
  199.   if the movieTime of sprite gMovieSprite < gStartTime then
  200.     set the movieRate of sprite gMovieSprite to 0
  201.     updateStage()
  202.     set the movieTime of sprite gMovieSprite to gStartTime
  203.     set the movieRate of sprite gMovieSprite to gPlaying
  204.     updateStage()
  205.     exit
  206.   else
  207.     if the movieTime of sprite gMovieSprite < gStopTime then
  208.       exit
  209.     else
  210.       set the movieRate of sprite gMovieSprite to 0
  211.       updateStage()
  212.       if gAutomated = 1 then
  213.         set gWhichAutomatedClip to gWhichAutomatedClip + 1
  214.         if gWhichAutomatedClip > (count(gAutomatedTimes) - 1) then
  215.           set gWhichAutomatedClip to 1
  216.         end if
  217.         advanceAutomatedMovie()
  218.         set the movieTime of sprite gMovieSprite to gStartTime
  219.         updateStage()
  220.         exit
  221.       else
  222.         storeStopTime(gStopTime)
  223.         storeStartTime(gStartTime)
  224.         set the movieTime of sprite gMovieSprite to gStartTime
  225.         updateStage()
  226.         set the movieRate of sprite gMovieSprite to gPlaying
  227.         updateStage()
  228.         exit
  229.       end if
  230.     end if
  231.   end if
  232. end
  233.  
  234. on checkClickOnMovieSprite leftSide, rightSide
  235.   if the mouseV < (the bottom of sprite gMovieSprite - 5) then
  236.     exit
  237.   end if
  238.   set oldMovieRate to the movieRate of sprite gMovieSprite
  239.   set the movieRate of sprite gMovieSprite to 0
  240.   updateStage()
  241.   if gAutomated = 1 then
  242.     correlateSliderPositionsToMovieTime()
  243.     if gSliderCorrelationCount = 0 then
  244.       set the movieRate of sprite gMovieSprite to oldMovieRate
  245.       exit
  246.     end if
  247.   end if
  248.   set thisClipDuration to gStopTime - gStartTime
  249.   storeStopTime(the movieTime of sprite gMovieSprite)
  250.   set minH to 1
  251.   if voidp(leftSide) then
  252.     set leftSide to the left of sprite gMovieSprite
  253.   end if
  254.   if voidp(rightSide) then
  255.     set rightSide to the right of sprite gMovieSprite
  256.   end if
  257.   set maxH to rightSide - leftSide
  258.   if gDontMessWithTheSlider = 1 then
  259.     set timeCodeX to getAt(gSliderCorrelation, 1)
  260.   else
  261.     set userSlide to 0
  262.     repeat while the stillDown
  263.       set userSlide to 1
  264.       updateSlider2(thisClipDuration, leftSide, minH, maxH)
  265.     end repeat
  266.     set timeCodeX to the result
  267.   end if
  268.   if timeCodeX > 0 then
  269.     set whichMovie to getAt(timeCodeX, 1)
  270.     if gWhichMovie <> whichMovie then
  271.       set gWhichMovie to whichMovie
  272.     end if
  273.     set gWhichClip to getAt(timeCodeX, 2)
  274.     set gWhichCamera to getAt(timeCodeX, 3)
  275.     if gWhichCamera <> "B" then
  276.       set gWhichCamera to "A"
  277.     end if
  278.     set lMovieTime to getAt(timeCodeX, 4)
  279.     set gWhichAutomatedClip to getAt(timeCodeX, 5)
  280.     set limitsX to getAt(gAutomatedTimes, gWhichAutomatedClip)
  281.     set gStartTime to getAt(limitsX, 4)
  282.     set gStopTime to getAt(limitsX, 5)
  283.     set gMinH to getAt(limitsX, 6)
  284.     set gMaxH to getAt(limitsX, 7)
  285.   end if
  286.   storeStartTime(the movieTime of sprite gMovieSprite)
  287.   set the movieRate of sprite gMovieSprite to oldMovieRate
  288. end
  289.  
  290. on updateSlider
  291.   if the movieRate of sprite gMovieSprite <> gPlaying then
  292.     if not developersKey() then
  293.       set the movieRate of sprite gMovieSprite to gPlaying
  294.     end if
  295.   end if
  296.   if gAutomated = 0 then
  297.     set minH to 133
  298.     set maxH to 333
  299.   else
  300.     set minH to gMinH
  301.     set maxH to gMaxH
  302.   end if
  303.   set minH to checkRange(minH, 133, 333)
  304.   set maxH to checkRange(maxH, 133, 333)
  305.   set thisClipDuration to gStopTime - gStartTime
  306.   set thisClipDuration to checkRange(thisClipDuration, 0.001, thisClipDuration)
  307.   set thePercentage to (the movieTime of sprite gMovieSprite - gStartTime) * 1.0 / thisClipDuration
  308.   set sliderPosition to ((maxH - minH) * thePercentage) + minH
  309.   set sliderPosition to checkRange(sliderPosition, minH, maxH)
  310.   setSlider(sliderPosition)
  311. end
  312.  
  313. on updateSlider2 thisClipDuration, leftSide, minH, maxH
  314.   if maxH <= 0 then
  315.     set maxH to 0.001
  316.     set thePercentage to leftSide
  317.   else
  318.     set thePercentage to the mouseH - leftSide
  319.   end if
  320.   set thePercentage to checkRange(thePercentage, minH, maxH)
  321.   set timeCodeX to 0
  322.   if gAutomated = 0 then
  323.     set the movieTime of sprite gMovieSprite to gStartTime + (thisClipDuration * (thePercentage * 1.0 / maxH))
  324.   else
  325.     set whichPosition to integer(gSliderCorrelationCount * (thePercentage * 1.0 / maxH))
  326.     set whichPosition to checkRange(whichPosition, 1, gSliderCorrelationCount)
  327.     set timeCodeX to getAt(gSliderCorrelation, whichPosition)
  328.     set lMovieTime to getAt(timeCodeX, 4)
  329.     set the movieTime of sprite gMovieSprite to lMovieTime
  330.   end if
  331.   set sliderPosition to 133 + ((333 - 133) * (thePercentage * 1.0 / maxH))
  332.   set sliderPosition to checkRange(sliderPosition, 133, 333)
  333.   puppetSprite(gSliderSprite, 1)
  334.   if maxH > 0.001 then
  335.     setSlider(sliderPosition)
  336.   end if
  337.   return timeCodeX
  338. end
  339.  
  340. on setSlider sliderPosition
  341.   if gDontMessWithTheSlider <> 1 then
  342.     if the locV of sprite gSliderSprite > 0 then
  343.       if gFullScreen = 0 then
  344.         set the loc of sprite gSliderSprite to point(sliderPosition, 314)
  345.       else
  346.         set the loc of sprite gSliderSprite to point(sliderPosition + 101, 463)
  347.       end if
  348.       updateStage()
  349.     end if
  350.   end if
  351. end
  352.